package com.andkrup.easygame.game {
	import com.adobe.net.URI;	
	import com.andkrup.easygame.ui.IViewPort;	
	import com.andkrup.easygame.game.commands.IGameCommand;	
	import com.andkrup.easygame.GamePackage;	
	import com.andkrup.events.IProgressDispatcher;	

	/**
	 * @author Andkrup
	 */
	public interface GameEngine extends IProgressDispatcher {
		function get hasGame():Boolean;
		function loadGamePackage(gamePackage:GamePackage):void;
		function unloadGamePackage(reset:Boolean = true):void;
		function loadGame(uri:URI, id:String, local:Boolean = true):Boolean;
		function saveGame(uri:URI, id:String = null, local:Boolean = true):Boolean;
		function getSaveGames(local:Boolean = true):Array;
		function loadGameData(url:URI, type:GameDataType):void;
		function saveGameData(url:URI, type:GameDataType):void;
		function clearGameData(url:URI, type:GameDataType, resetLocal:Boolean = true, resetExternal:Boolean = false):void;
		function loadAssets():void;
		function createNewGame():void;
		function startCurrentGame():void;
		function abortCurrentGame():void;
		function evaluateCommand(cmdName:String, ...args):void;
		function digestCommand(command:IGameCommand):Boolean;
		function get viewPort():IViewPort;
		function set viewPort(value:IViewPort):void;
	}
}
